package com.xueyi.game.backend.service.impl;

import cn.hutool.http.HttpUtil;
import com.xueyi.game.backend.service.ISelectService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

/**
 * @author luqiqi
 * @date : 2023/5/10
 * @Description :
 */
@Service
@Slf4j
@AllArgsConstructor
public class SelectServiceImpl implements ISelectService {
    /**
     * 查询Map信息
     *
     * @param keyword 关键字
     * @return
     */
    @Override
    public String findWeChatMap(String keyword) {
        Map<String, Object> mapParam = new HashMap<>();
        mapParam.put("key", "TBHBZ-LFOKJ-63UFH-FHLQL-K7GGE-B4FGF");
        mapParam.put("keyword", keyword);

        return HttpUtil.get("https://apis.map.qq.com/ws/place/v1/suggestion", mapParam);
    }
}
